package com.bajiao.common.menu;

import lombok.Getter;

@Getter
public enum ResultEnum {

    OPERATION_SUCCESS(1, "success"),
    DELETE_SUCCESS(1, "删除成功!"),
    BATCH_DELETE_SUCCESS(1, "批量删除成功!"),
    ADD_SUCCESS(1, "添加成功!"),
    EDIT_SUCCESS(1, "编辑成功!"),
    QUERY_SUCCESS(1, "查询成功!"),

    OPERATION_FAIL(0,"操作失败!"),
    DELETE_FAIL(0,"删除失败!"),
    ADD_FAIL(0,"添加失败!"),
    EDIT_FAIL(0,"编辑失败!"),
    QUERY_FAIL(0,"查询失败!"),

    AUDIT_PASS(1,"审核通过"),

    PAYMONEY_GREATER_GOODSMONEY(0,"用户期待退款金额比实付款金额大，不能通过"),

    QUERY_NOT_EXIST(0,"查询不存在"),

    ERROR(0, "系统开了小差~"),
    ORDER_GOODS_ISNOT_REFUND(0,"存在售后中的订单，不能确认收货，请处理"),

    /**
     * 登陆注册返回code
     */
    LOGIN_SUCCESS(1,"登陆成功"),
    LOGIN_FAIL(0,"登录失败"),
    USER_PWD_ERROR(0,"用户名或密码错误"),
    USER_EXIST(0, "用户已存在"),
    USER_NOT_EXIST(0, "用户不存在"),
    PASSWORD_ERROR(0,"旧密码错误"),
//    PASSWORD_RIGHT(307,"密码正确"),
    USER_IS_CANCEL(0, "该用户已注销"),
    USER_IS_FREEZE(0, "出于安全考虑，该账户暂时被冻结，详情请联系客服"),

	/**
	 * 手机号
	 */
    MOBILE_NOT_EXIST(0,"手机号不存在"),
    MOBILE_EXIST(0,"手机号已存在"),
	MOBILE_NOT_REGISTER(0,"手机号未注册"),
	MOBILE_EXIST_REGISTER(0,"手机号已注册"),
	MOBILE_ERROR(0,"手机号码错误"),
	MOBILE_RIGHT(1,"手机号码正确"),


    /**
     * 小程序登录
     */
    NO_UNIONID(0,"UNIONID为空"),
    BIND_ERROR(0,"绑定失败"),
    NO_BIND(3,"未注册"),


	/**
	 * 短信相关
	 */
	SMS_SEND_SUCCESS(1,"验证码发送成功"),

	SMS_SEND_FAIL(0,"验证码发送失败"),

	SMS_CODE_ERROR(0, "验证码错误"),

	SMS_CODE_OVERTIME(0,"验证码超时"),

	SMS_VALIDATE_SUCCESS(1,"短信验证通过"),

    SMS_SEND_OVERLIMIT(0,"请求太频繁，请稍后再试"),

    SMS_SEND_OVERLIMIT_DAY(0,"请求太频繁，请明日再试"),

	/**
	 * 邮箱
	 */
	EMAIL_NOT_EXIST(1,"邮箱不存在"),
	EMAIL_EXIST(0,"邮箱已存在"),
	EMAIL_NOT_REGISTER(1,"邮箱未注册"),
	EMAIL_EXIST_REGISTER(0,"邮箱已注册"),
	EMAIL_ERROR(0,"邮箱错误"),
	EMAIL_RIGHT(1,"邮箱正确"),


	/**
	 * 邮箱相关
	 */
	EMAIL_SEND_SUCCESS(1,"验证码发送成功"),

	EMAIL_SEND_FAIL(0,"验证码发送失败"),

	EMAIL_CODE_ERROR(0, "验证码错误"),

	EMAIL_CODE_OVERTIME(0,"验证码超时"),

	EMAIL_VALIDATE_SUCCESS(1,"验证通过"),

	/**
	 * 个人中心
	 */
	NOT_EXIST_OLDAVATAR(0,"没有上一个头像"),

	/**
	 * 签到
	 */
	SIGNED_IN_TODAY(0,"今日已签到"),

	/**
     * 钱包
     */

    BALANCE_DEFICIENCY(0,"余额不足"),

    SCORE_DEFICIENCY(0,"积分不足"),
    NOT_BAND_WX_INFO(0, "请先绑定微信收款信息！"),
    NOT_BAND_ZFB_INFO(0, "请先绑定支付宝收款信息！"),
    NOT_BAND_BANK_INFO(0, "请先绑定银行卡收款信息！"),
	/**
	 * 活动
	 */

	TEAMFOUND_EXIST(0,"开团失败,已存在开团"),

	TEAMFOLLOW_FAIL_CLOSE(0,"参团失败,已结束关闭"),

    /**
     * 合作园
     */

    MAXIMUM_NUMBER_OF_PEOPLE(0,"合作园已达人数上限"),
    NOT_DIRECTOR(0,"非园长身份不可开通合作园"),
    REPEAT_APPLY(0,"已有申请在审核中"),
    NOT_REPEAT_ADD(0,"不能重复添加"),
	PRESCHOOL_NOT_EXIST(0,"申请的合作园不存在"),
	NOT_ADD_ONESELF_MOBILE(0,"不能添加自身手机号"),
    PRESCHOOL_IS_EXIST(0,"已申请合作园，不能重复申请"),
	NOT_ADD_ONT_TEACHER_MOBILE(0,"不能添加非老师身份手机号"),

	/**
     * 权限不足 返回code 值范围
     */
    SESSION_EXPIRED(0, "请先登录"),
    NOT_DEVICE(0, "当前不是同一个设备登录,请从新登录"),
    NO_PERMISSION(0, "无操作权限"),

    /**
     * 参数缺失 返回code 值范围 803001 -- 803999
     */
    PARAMETER_INVALID(0, "请求参数不合法"),

    PARAMETER_MISSING(0, "缺少参数"),
    /**
     * 后台报错 code 之范围
     */
    SYSTEM_ERROR(0, "服务器报错"),


    SEND_MSG_ERROR(0, "消息发送失败"), CODE_OVERDUE(0, "验证码失效"), ROLE_NAME_CONFLICT(0, "角色名称已存在"),
    MENU_NAME_CONFLICT(0, "菜单名称已存在"),


    UPLOAD_FAILURE(0, "上传失败"),
    /**
     * 登陆注册返回code 值范围
     */

    /**
     * 返回token认证
     */
    TOKEN_OVERDUE(2,"token已过期"),
    TOKEN_NOT_OVERDUE(0,"token未过期"),


    NAME_NOT_NULL(0, "姓名不能为空"),
    HOMEOWNERS_NOT_NULL(0, "户主信息不能为空"),
    PRINCIPAL_DEL_ERROR(0, "该用户存在负责人职位，无法删除"),
    IDENTITY_EXIST(0, "身份证号码已存在"),
    IDENTITY_NOT_NULL(0, "身份证号码不能为空"),
    IDENTITY_VERIFY_FAILURE(0, "身份证认证失败"),

    /**
     * QQ/微信/微博
     */
    BINDING_SUCCESS(1,"绑定成功"),
    BINDING_FAIL(0,"绑定失败"),
    UNBOUND_OPENID(1,"未绑定账号"),
    REPEATED_BINDING(0,"重复绑定"),



    /**
     * 身份证验证
     */
    NOT_SCUUESS1(0, "身份证或姓名手机号与卡号不符"),
//    NOT_SCUUESS2(202,"无法验证"),
//    NOT_SCUUESS3(203,"份证号调用次数达到上限,请12小时后在请求"),
//    NOT_SCUUESS4(204,"姓名错误"),
//    NOT_SCUUESS5(205,"身份证号错误"),
//    NOT_SCUUESS6(206,"银行卡号错误"),
//    NOT_SCUUESS7(207,"电话号码错误"),
//    NOT_SCUUESS8(208,"银行卡重复添加"),

    /**
     * 订单
     */
    REMIND_DELIVER_GOODS(1,"提醒发货成功"),
    NOT_REPEAT_EVALUATE(0,"该商品已经评价"),
    /**
     * 商品
     */
    STOCK_DEPLETE(0,"库存不足"),
    REPEAT_BUY(0,"请勿重复购买课程"),
    /**
     * 支付相关
     */
    PAY_PASSWORD_ERROR(0,"支付密码错误"),
    PAY_PASSWORD_RIGHT(1,"支付密码正确"),
    PAY_PASSWORD_NOT_EXIST(0,"支付密码不存在,请先设置支付密码"),


    /**
     * 发票相关
     */
    INVOICE_MONEY_ERROR(0,"申请发票金额与订单金额不符"),

    /**
     * 优惠券
     */
    COUPON_QUERY_NOT_EXIST(0,"查询不到符合要求优惠券"),
    /**
     * 优惠券相关
     */
    COUPON_NOT_EXIST(0,"已没有优惠券"),
    COUPON_USE_FAIL(1,"优惠券使用失败"),
    SHARE_GIFT_ALREADY_BEEN_REDEEMED(0,"您已兑换过该礼包"),
    NOT_ENOUGH_PEOPLE_TO_SHARE(0,"您分享的人数不够"),
	/**
	 * 售后相关
	 */
	AFTERSALES_EXIST(0,"已有提交售后申请"),

    AFTERSALES_NOT_EXIST(0,"未提交售后申请或者售后申请未通过"),

	/**
	 * 店铺相关
	 */

    SHOP_APPLAY_NOT_EXIST(0,"店铺申请不存在"),

	SHOP_APPLAY_REPEAT(0,"店铺重复申请"),

	PAY_PASSWORD_DIFF(0,"两次输入的支付密码不一致"),

    USERNAME_APPLAY_REPEAT(0,"该登录账号已经申请过，请您重新换一个登录账号。"),

    /**
     * 三方订单相关
     */
    ORDER_QUERY_SUCCESS(1,"订单查询成功"),

    ORDER_QUERY_FAIL(0,"订单查询失败"),
    ;

    private int value;

    private String desc;

    public int value() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String desc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    private ResultEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

}
